LLVM_BIN=/usr/bin
# LLVM_BIN=~/disk2/bin/llvm_12/bin

CPP=${LLVM_BIN}/clang++
CPPFLAGS=-Wall -g `${LLVM_BIN}/llvm-config --cxxflags --ldflags --system-libs --libs core`
CPPLINKS=-lpthread

SRC=$(wildcard *.cpp)
OBJ=$(patsubst %.cpp, %, $(SRC))

.PHONY:all clean

all: $(OBJ)

%:%.cpp
	@echo "link option: ${CPPLINKS}"
	$(CPP) $<  $(CPPFLAGS) -o $@ $(CPPLINKS)

clean:
	rm -rf $(OBJ)
